package com.edu.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * ClassName:Dog
 * Package:com.edu.pojo
 * Description:
 * Date:2020/5/24 22:26
 * User: snow
 */
@Component
public class Dog implements Serializable {
	@Value("旺财")
	private String name;
	@Value("4")
	private Integer age;

	public Dog(){
	}

	public Dog(String name, Integer age) {
		this.name = name;
		this.age = age;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	@Override
	public String toString() {
		return "Dog{" +
				"name='" + name + '\'' +
				", age=" + age +
				'}';
	}
}
